package com.adcc.eoss.efb.ngctrl;

import com.adcc.eoss.efb.ngctrl.Service.Condition.LinuxCondition;
import com.adcc.eoss.efb.ngctrl.Service.Condition.WindowsCondition;
import com.adcc.eoss.efb.ngctrl.Service.impl.LinuxCmdService;
import com.adcc.eoss.efb.ngctrl.Service.impl.WindowsCmdService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

@SpringBootApplication
@Configuration
public class NgctrlApplication {

	@Bean
	@Conditional(WindowsCondition.class)
	public WindowsCmdService getWindowsCmdService()
	{
		return new WindowsCmdService();
	}

    @Bean
    @Conditional(LinuxCondition.class)
    public LinuxCmdService getLinuxCmdService()
    {
        return new LinuxCmdService();
    }

	public static void main(String[] args) {

		SpringApplication.run(NgctrlApplication.class, args);
	}
}
